TGML Value Range Conversion: <ConvertRange>

ConvertRange specifies how a server variable (signal) value shall be converted to a TGML element attribute value using min and max values. A ConvertRange element belongs to the immediate parent Bind element.

A ConvertRange rule is executed when the signal value is within the specified range.

Attribute Type Description

AttributeMaxValue

String (untyped)

The upper bound of the attribute value. The referenced attribute (referenced by the Bind element) will be set to this value when the signal value is more than or equal to SignalMaxValue.
Inheritable: No
Animatable: No

AttributeMinValue

String (untyped)

The lower bound of the attribute value. The referenced attribute (referenced by the Bind element) will be set to this value when the signal value is less than or equal to SignalMinValue.
Inheritable: No
Animatable: No

SignalMaxValue

String (untyped)

The upper bound of the signal value.
Inheritable: No
Animatable: No

SignalMinValue

String (untyped)

The lower bound of the signal value.
Inheritable: No
Animatable: No

Example:

Copy
<TGML>
    <Polygon Points-"150.0,50.0 160.0,150.0 140.0,150.0” Fill="#FF0000" Stroke="#000000" StrokeWidth="l.0"> 
        <Rotate Angle="0.0" Center="0.5,1.1">
            <Bind Name="Flow" Attribute="Angle">
            <ConvertRange AttributeMinValue="-90.0" SignalMinValue="0.0" AttributeMaxValue="90.0" SignalMaxValue="60.0" /> 
            </Bind>
        </Rotate>
    </Polygon>
</TGML>

Example on screen:

Example of other ConvertValue elements:

Copy
<TGML>
    <Polygon Points="50.0,50.0 150.0,50.0 150.0,150.0 50.0,150.0" Stroke="#000000" Fill="#000000">
        <Bind Name="Temperature" Attribute="Fill" >
            <ConvertValue AttributeValue="#0000FF" SignalLessThan="18.0"/>
            <ConvertValue AttribureValue="#00FF00" SignalMoreOrEqualTo="18.0" SignalLessOrEqualTo="22.0"/>
            <ConvertValue AttributeValue="#FF0000" SignalMoreThan="22.0"/>
        </Bind>
    </Polygon>
</TGML>

Example of other ConvertValue elements on screen: